//
//  HiddenView.m
//  Comma
//
//  Created by liuyunqing on 15/1/19.
//  Copyright (c) 2015年 lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "HiddenView.h"
#import "GlobalMacro.h"
@implementation HiddenView


- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        NSArray *array = [NSArray arrayWithObjects:@"全国", @"本省", @"本市", @"本校", nil];
        self.countryButton = [[UIButton alloc] initWithFrame:CGRectMake(36 + 0 * 36 + (0 * 54), -8, 36, 46)];
        [_countryButton setTitle:[array objectAtIndex:0] forState:UIControlStateNormal];
        [self addSubview:_countryButton];
        
        self.provinceButton = [[UIButton alloc] initWithFrame:CGRectMake(36 + 1 * 36 + (1 * 54), -8, 36, 46)];
        [_provinceButton setTitle:[array objectAtIndex:1] forState:UIControlStateNormal];
        [self addSubview:_provinceButton];
        
        self.cityButton = [[UIButton alloc] initWithFrame:CGRectMake(36 + 2 * 36 + (2 * 54), -8, 36, 46)];
        [_cityButton setTitle:[array objectAtIndex:2] forState:UIControlStateNormal];
        [self addSubview:_cityButton];
        
        self.schoolButton = [[UIButton alloc] initWithFrame:CGRectMake(36 + 3 * 36 + (3 * 54), -8, 36, 46)];
        [_schoolButton setTitle:[array objectAtIndex:3] forState:UIControlStateNormal];
        [self addSubview:_schoolButton];
        
        self.search = [[UISearchBar alloc] initWithFrame:CGRectMake(8, 28, SCREEN_WIDTH - 16, 32)];
        [_search setPlaceholder:@"请输入地区或者学校名称,可以模糊搜索哦"];
        [self addSubview:_search];
        
    }
    return self;
}


/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
